<extend name="public:base" />
<block name="breadcrumb">
    <ul class="breadcrumb">
        <li>
            <i class="ace-icon fa fa-book"></i>
            <a href="../User/index">{:L('应用管理')}</a>
        </li>
        <li class="">{:L('内容管理')}</li>
        <li class="active">{:L('单页管理')}</li>
    </ul>
</block>
<block name="c-block">
    <div class="main-content">
        <!-- #section:settings.box -->

        <!-- /.ace-settings-container -->

        <!-- /section:settings.box -->
        <div class="page-content-area">

            <div class="page-header">
                <a href="{:U('singleAdd')}" class="btn btn-sm btn-primary">
                    <i class="ace-icon glyphicon glyphicon-plus"></i>
                    新添加
                </a>
                <!-- <h1>
                    單頁管理            <small>
                    <i class="ace-icon fa fa-angle-double-right"></i>
                    單頁列表            </small>
                    <ul class="nav navbar-nav navbar-right">
                        <button class="btn btn-sm btn-primary" onclick="openDialog('{:U('singleAdd')}', '新增單頁');">
                            <i class="fa fa-plus"></i> 新增單頁 </button>
                    </ul>
                </h1> -->
            </div>

            <div class="row">
                <div class="col-xs-12">
                    <!-- PAGE CONTENT BEGINS -->
                    <table id="simple-table" class="table table-striped table-bordered table-hover">
                        <thead>
                        <tr>
                            <th class="center" width="10">
                                Item
                            </th>
                            <th>標題</th>
                            <th width="10%">狀態</th>
                            <th width="15%">创建时间</th>
                            <th style="text-align:right" width="10%">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <volist name="lists" id="vo" empty="暂没相关数据">
                            <tr id="id_{$vo.id}">
                                <td>{$vo['id']}</td>
                                <td >{$vo['title']}</td>
                                <td >
                                    <switch $vo.status>
                                        <case 1>正常</case>
                                        <case 0>禁用</case>
                                    </switch>

                                </td>
                                <td >{$vo['add_time']|date="Y-m-d H:i",###}</td>
                                <td class="text-right">
                                    <!-- <button class="btn btn-xs btn-info" onclick="openDialog('{:U('singleEdit',['id'=>$vo['id']])}', '修改單頁');"> -->
                                    <button class="btn btn-xs btn-info" onclick='window.location.href="{:U(\'singleEdit\',[\'id\'=>$vo[\'id\']])}"'>
                                    <i class="ace-icon fa fa-pencil bigger-120"></i>
                                    </button>
                                    <button class="btn btn-xs btn-danger delete confirm" data-rel="确定删除吗？" data-action="{:U('singleDel',['id'=>$vo['id']])}">
                                        <i class="ace-icon fa fa-trash-o bigger-120"></i>
                                    </button>
                                </td>
                            </tr>
                        </volist>
                        <tr>
                            <td colspan="12">
                                <ul class="pagination">
                                </ul>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <!-- PAGE CONTENT ENDS -->
                </div>
                <!-- /.col -->
            </div>
            <!-- /.row -->
        </div>
        <!-- /.page-content-area -->
    </div>
</block>
